package com.yorick.authority.dao;

import com.yorick.authority.entitys.FindResourceDto;
import com.yorick.authority.entitys.ResourceDto;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MenuMapper {
    //根据机构查询菜单树状图
    List<ResourceDto> findResources(boolean superRole);

    //新增菜单
    //查询菜单名称是否存在
    Integer isResourceExist(String resourceName);

    //排序
    Integer findOrderNumByResourceID(int parentId);

    //新增菜单
    void addResource(ResourceDto data);

    //更新菜单
    void updateResource(ResourceDto data);

    //根据菜单ID查询详情
    ResourceDto findResourceByResourceID(FindResourceDto data);
}
